home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Interactive Media Design Review 1999
/
Interactive Media Design Review 1999.iso
/
pc
/
Demos
/
Bombardier_PC
/
DATACH.CST
/
00276_Script_popUpClH
< prev
next >
Wrap
Text File
|
1999-03-07
|
4KB
|
136 lines
property thePopLocn, popSpriten, popNamen, mySpriten, faraway, fieldObjn
global currentChartName, popbgSpriten
property xcBackplate, xcHilite, xcPopup, xcTriangle, xcBehavior
on getPropertyDescriptionList
set description=[:]
addProp description,#xcBehavior,[#default:"",#format:#integer, ¼
#comment:"The popups behavior"]
addProp description,#xcPopup,[#default:"",#format:#integer, ¼
#comment:"The popup sprite "]
addProp description,#xcHilite,[#default:"",#format:#integer, ¼
#comment:"The Hilite sprite "]
addProp description,#xcBackplate,[#default:"",#format:#integer, ¼
#comment:"The backplate sprite "]
addProp description,#xcTriangle,[#default:"",#format:#integer, ¼
#comment:"The triangle sprite "]
return description
end
on get behaviorDescription
return "Generic popup"
end
--on new me
-- set mySpriten = the spriteNum of me
-- set popSpriten = xcPopup
-- set popbgSpriten = xcBackplate
-- set right = (the left of sprite mySpriten)
-- set top = (the top of sprite mySpriten)
-- set thePopLocn = point(right, top)
-- put "b"&&xcBehavior&&xcPopup&&xcHilite&&xcBackplate&&xcTriangle
-- if xcBehavior < 10 then
-- set popNamen = "mdl_field"
-- else
-- if xcBehavior < 20 then
-- set popNamen = "fraction_field"
-- else
-- if xcBehavior < 30 then
-- set popNamen = "bjsmdl_field"
-- end if
-- end if
-- end if
-- put popNamen & "is the field" & string(xcBehavior) & "is the action"
--
-- puppetSprite popSpriten, true
-- set faraway = point(-1000, -1000)
-- set the loc of sprite popSpriten = faraway
-- return me
--end
on register me, theObj
set fieldObjn = theObj
set mySpriten = the spriteNum of me
set popSpriten = xcPopup
set popbgSpriten = xcBackplate
set right = (the left of sprite mySpriten) + 15
set top = (the top of sprite mySpriten) + 10
set thePopLocn = point(right, top)
-- put "b"&&xcBehavior&&xcPopup&&xcHilite&&xcBackplate&&xcTriangle
if xcBehavior < 10 then
set popNamen = "mdl_field"
else
if xcBehavior < 30 then
set popNamen = "fraction_field"
else
if xcBehavior < 40 then
set popNamen = "bjsmdl_field"
end if
end if
end if
--put popNamen & "is the field" & string(xcBehavior) & "is the action"
puppetSprite popSpriten, true
set faraway = point(-1000, -1000)
set the loc of sprite popSpriten = faraway
return xcHilite
end
on mouseEnter
set the member of sprite xcTriangle to "arrowglow.hlt"
end mouseEnter
on mouseLeave
set the member of sprite xcTriangle to "arrowglow"
end mouseLeave
on mouseDown me
set the member of sprite popSpriten = member popNamen
set the loc of sprite popSpriten = thePopLocn
set the member of sprite popbgSpriten = member popNamen
set the loc of sprite popbgSpriten = thePopLocn
--put "popped - " & thepoplocn
updateStage
repeat while the stillDown
checkIfInside fieldObjn
end repeat
set the loc of sprite popSpriten = faraway
set the loc of sprite popbgSpriten = faraway
set name = getPlaneName(fieldObjn)
if name = "" then
nothing
else
case xcBehavior of
0:
disbjs(name)
1:
set the text of field "displane" = string(name)
dispricing(name)
21:
disbjsfraction(name,1)
22:
disbjsfraction(name,2)
23:
disbjsfraction(name,3)
31:
disbjscol(name,1)
32:
disbjscol(name,2)
33:
disbjscol(name,3)
end case
end if
set the loc of sprite popSpriten = faraway
set the loc of sprite popbgSpriten = faraway
updateStage
end
on mouseUp me
nothing
end